package com.qh.book.service.impl;

import java.util.ArrayList;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import com.qh.book.dataobj.OrderDetail;
import com.qh.book.enums.ResultEnum;
import com.qh.book.exception.BsException;
import com.qh.book.repository.OrderDetailRepository;
import com.qh.book.service.OrderDetailService;
import com.qh.book.service.OrderMasterService;

@Service
@Transactional
public class OrderDetailServiceImpl implements OrderDetailService{
	
	@Autowired
	private OrderDetailRepository orderDetailRepository;
	
	@Autowired
	private OrderMasterService orderMasterService;

	@Override
	public List<OrderDetail> findByOrderId(String orderId) {
		
		orderMasterService.findOne(orderId);
		
		return orderDetailRepository.findByOrderId(orderId);
	}

}
